<template>
	<div class="about">
		<h1 @click="truncate(currentBranch)">~~~~</h1>
		<br />
		<h1 @click="truncate(currentBranch)">xxx</h1>
	</div>
</template>

<script setup>
import {getCurrentInstance, ref} from 'vue';
const currentBranch = ref('两块五');
const response = ref('');
const { proxy, ctx } = getCurrentInstance();

function truncate(v) {
	try {
		proxy.$api.get('/data/demo01', { id: '123' }).then((res) => {
			console.log(res);
			console.log(res.name);
			msessage.success();
		});
	} catch (error) {
		console.error(error);
	}
}
</script>

<style>
@media (min-width: 1024px) {
	.about {
		min-height: 100vh;
		display: flex;
		align-items: center;
	}
}
</style>
